TETextBox
The TETextBox procedure draws the indicated text in a given rectangle with the specified alignment.
PROCEDURE TETextBox (text: Ptr; length: LongInt; box: Rect;
align: Integer);
text
- A pointer to the text to be drawn.
length
- The number of bytes comprising the text.
box
- The rectangle where the text is to be drawn. The rectangle is specified in local coordinates (of the current graphics port) and must be at least as wide as the first character drawn. (A good rule of thumb is to make the rectangle at least 20 pixels wide.)
align
- The kind of alignment for the specified text.
DESCRIPTION
The TETextBox procedure provides you with an easy way to display static text to a user. It creates its own monostyled edit record, which it deletes when finished with it, so you cannot edit the text it draws. The TETextBox procedure breaks a line of text correctly. You can specify how text is aligned in the box using any of the following alignment constants:
| Constant | Description |
|---|
| teFlushDefault | Aligned according to primary line direction |
| teCenter | Centered for all scripts |
| teFlushRight | Right aligned for all scripts |
| teFlushLeft | Left aligned for all scripts |